package gui;

import javax.swing.JPanel;


import java.awt.Color;
import java.awt.Font;

import javax.swing.JTextField;

/**
 * Panel z polem tekstowym na wiadomosci dla użytkownika.
 */
class UpperPane extends JPanel {

	private static final long serialVersionUID = 1L;
	
	private JTextField messageField;

		 
		 public UpperPane(){
				this.init();	
			}
		 
			
			private void init(){  
				//this.setSize(DEFAULT_WIDTH, 80);
				//this.setLayout(new FlowLayout());
				setBackground(Color.gray);
				
				messageField = new JTextField(50);
				this.messageField.setFont(new Font("Serif", Font.BOLD, 20));
				messageField.setText("Symulacja supermarketu. Zacznij symulację.");
				this.messageField.setEditable(false);
				add(messageField);
				//messageField.setSize(20, 20);
				
			}
			
			public void displayMessage(String message)
			{
				
				//this.messageField.setBackground(Color.BLACK);
				
				this.messageField.setText(message);
			}
			
}

